package top.fzqblog.collections

/**
 * Created by 抽离 on 2017/11/7 0007.
 *
 */
class Example{
    fun str(): Int{
        return 3
    }
}

fun main(args: Array<String>) {
    val list = listOf(1, 2, 3, 4, 5, 6)
    print(list.groupBy { if (it % 2 == 0) "even" else "odd" })

    println("--------------华丽分割线---------------")

    val example = Example()
    val applyReturn = example.str().apply {
        println("自减之后：" + dec())
    }

    println("applyReturn：" + applyReturn)
}